<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">
								<label class="col-sm-3 control-label">白名单文件类型：</label>
								<div class="col-sm-8">
									<input id="setValue" name="whiteNameList" class="form-control" type="text" >
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button onclick="updateType();" class="btn btn-primary">提交</button>
								</div>
							</div>
							<input type="hidden" name="deptId" th:value="${deptId}">
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
<script>
	function updateType() {
		var setValue = $("#setValue").val();
		if(setValue == "" || setValue == null) {
			parent.layer.alert("文件类型不能为空");
			return;
		}
		$.ajax({
			cache : true,
			type : "POST",
			url : "/system/sysDept/updateType",
			data : $('#signupForm').serialize(),// 你的formid
			async : false,
			success : function(data) {
				if (data.code == 0) {
					parent.layer.msg("操作成功");
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);
					parent.getDeptDetail();
				} else {
					parent.layer.alert(data.msg)
				}
			}
		});
	}
</script>
</body>
</html>
